Page({

    data: {
        w: '',
        t: '1',
        headsmall:''
    },
    radioChange:function (e) {
        this.setData({
            t: e.detail.value
        });
    },
    w:function (e) {
        this.setData({
            w: e.detail.value
        });
    },
    sendFk:function (e) {
        wx.showLoading({
            title: '请稍候...',
            mask: true
        });

        let _w = this.data.w;
        let _t = this.data.t;

        var that = this;
        wx.request({
            url: 'https://mb.800151.com/phalapi/Public/applet/?service=demo.getCode',
            data: {
                'w': _w,
                't': _t
            },
            header: {
                'content-type': 'application/json'
            },
            success: function (res) {
                console.log(res);
                wx.hideLoading();
                wx.showToast({
                    title: '成功',
                    icon: 'success',
                    duration: 1000
                });
                that.setData({
                    headsmall: res.data.data.headsmall
                })
            }
        })
    },
    indexClick: function (e) {
        wx.redirectTo({
            url: '/pages/index/index'
        })
    }

});